package com.mytest.utils;

import java.io.Serializable;
import java.util.Date;

public class UserGroupDto implements Serializable {

    /**
     * 主键，无业务含义
     */
    private long id;

    /**
     *
     */
    private Long groupId;

    /**
     *
     */
    private Long unitId;

    /**
     *
     */
    private Long posId;

    /**
     *
     */
    private String posName;

    /**
     *
     */
    private String posType;

    /**
     *
     */
    private Long ucId;

    /**
     *
     */
    private String account;

    /**
     *
     */
    private String userName;

    /**
     *
     */
    private String email;

    /**
     *
     */
    private Date createTime;

    /**
     *
     */
    private Long creatorPosId;

    /**
     *
     */
    private String creatorPosName;

    /**
     *
     */
    private Long creatorUcId;

    /**
     *
     */
    private String creatorAccount;

    /**
     *
     */
    private String creatorName;

    /**
     *
     */
    private String creatorEmail;

    /**
     * T
     */
    private String refUnit;


    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    public Long getUnitId() {
        return unitId;
    }

    public void setUnitId(Long unitId) {
        this.unitId = unitId;
    }

    public Long getPosId() {
        return posId;
    }

    public void setPosId(Long posId) {
        this.posId = posId;
    }

    public String getPosName() {
        return posName;
    }

    public void setPosName(String posName) {
        this.posName = posName;
    }

    public String getPosType() {
        return posType;
    }

    public void setPosType(String posType) {
        this.posType = posType;
    }

    public Long getUcId() {
        return ucId;
    }

    public void setUcId(Long ucId) {
        this.ucId = ucId;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Long getCreatorPosId() {
        return creatorPosId;
    }

    public void setCreatorPosId(Long creatorPosId) {
        this.creatorPosId = creatorPosId;
    }

    public String getCreatorPosName() {
        return creatorPosName;
    }

    public void setCreatorPosName(String creatorPosName) {
        this.creatorPosName = creatorPosName;
    }

    public Long getCreatorUcId() {
        return creatorUcId;
    }

    public void setCreatorUcId(Long creatorUcId) {
        this.creatorUcId = creatorUcId;
    }

    public String getCreatorAccount() {
        return creatorAccount;
    }

    public void setCreatorAccount(String creatorAccount) {
        this.creatorAccount = creatorAccount;
    }

    public String getCreatorName() {
        return creatorName;
    }

    public void setCreatorName(String creatorName) {
        this.creatorName = creatorName;
    }

    public String getCreatorEmail() {
        return creatorEmail;
    }

    public void setCreatorEmail(String creatorEmail) {
        this.creatorEmail = creatorEmail;
    }

    public String getRefUnit() {
        return refUnit;
    }

    public void setRefUnit(String refUnit) {
        this.refUnit = refUnit;
    }


    public static void main(String[] args) {

        String unicodeString = "\\u6c34\\u5854";

        System.out.println(unicodeToCn(unicodeString));

    }

    private static String unicodeToCn(String unicode) {
        /** 以 \ u 分割，因为java注释也能识别unicode，因此中间加了一个空格*/
        String[] strs = unicode.split("\\\\u");
        String returnStr = "";
        // 由于unicode字符串以 \ u 开头，因此分割出的第一个字符是""。
        for (int i = 1; i < strs.length; i++) {
            returnStr += (char) Integer.valueOf(strs[i], 16).intValue();
        }
        return returnStr;
    }
}
